home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
coreaids.arc
/
CLOSE.ASM
< prev
next >
Wrap
Assembly Source File
|
1987-06-25
|
693b
|
35 lines
; DESC: Closes a file handle V1.00
; IN: *{INHNDL} handle of file to be closed
; SAMPLE: Callm CLOSE,<INHNDL>,
; ##################################################################
Extrn PUSHALL:Near
Extrn POPALL:Near
Extrn ERRORMSG:Near
CLOSEC Segment
Assume CS:CLOSEC
Public CLOSE
;notice.
DB 'CLOSE - V1.00, Copyright 1987, CoreTechs ',0DH,0AH
CLOSE Proc Near ;closes a file.
Call PUSHALL
Pop BX ;get the handle.
Mov AH,3EH ;close a file.
Int 21H
Jc ERROR ;if error report it.
Call POPALL
Ret
ERROR: Push AX ;report error and abort.
Call ERRORMSG
CLOSE Endp
CLOSEC Ends
End